<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        *{
            padding: 0;
            margin: 0;
        }
        body{
            height: 1600px;
        }
        .top{
            width: 100%;
            height: 300px;
            background: pink;
        }
        .nav{
            width: 100%;
            height: 60px;
            background: red;
            position: sticky;
            left: 0;
            top: 0;
        }
    </style>
</head>
<body>
    <div class="top"></div>
    <div class="nav">
</body>
</html>